<!DOCTYPE html>
<html lang="zh">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>DOM 1</title>
  <style>
    .red {
      background: red;
    }
  </style>
</head>

<body>
  示例
  <div>
    <div id="test1"><span>test1</span>
      <p class="red">段落标签1</p> test2
    </div>
    <div id="test2">
      <p class="red">段落标签2</p> test2
    </div>
  </div>
  <script src="dom.js"></script>
  <script src="main.js"></script>
</body>

</html>